<?php
namespace app\manage\validate;

use think\Validate;

class Account extends Validate
{
    protected $rule = [
        'acc_name'  =>  'require|length:0,30',
        'acc_desc'  =>  'require|length:0,30',
        'adv_id'  =>  'require|length:0,30',
//        'acc_password'  =>  'require|length:0,30',
//        'macc_id'  =>  'require|length:0,30',
//        'api_token'  =>  'require|length:32',
//        'ocpc_token'  =>  'require|length:65',

//        'adv_id'  =>  'length:0,30',
        'acc_password'  =>  'length:0,30',
        'macc_id'  =>  'length:0,30',
        'api_token'  =>  'length:32',
        'ocpc_token'  =>  'length:65',
    ];

    protected $message  =   [
        'acc_name.require' => '账户名称必须',
        'acc_name.length'  => '账户名称0-30个字符',
        'acc_desc.require' => '账户简称必须',
        'acc_desc.length'  => '账户简称0-30个字符',
        'adv_id.require' => '账户ID必须',
        'adv_id.length'  => '账户ID：0-30个字符',
        'acc_password.require' => '账户密码必须',
        'acc_password.length'  => '账户密码0-30个字符',
        'macc_id.require' => '管家账户必须',
        'macc_id.length'  => '管家账户0-30个字符',
        'api_token.require' => 'ApiToken必须',
        'api_token.length'  => 'ApiToken：32个字符',
        'ocpc_token.require' => '转化Token必须',
        'ocpc_token.length'  => '转化Token：65个字符',
    ];

}